#include <stdio.h>
#define n 10
int main() 
{
    int i, j, m, k, x, a[n];
    scanf("%d", &a[0]);
    for (i = 1; i < n; i++) 
	{
        scanf("%d", &a[i]);
        x = a[i];
        k = 0;
        j = i - 1;
        while (k <= j) {
            m = (k + j) / 2;
            if (x < a[m]) {
                j = m - 1;
            }
            else {
                k = m + 1;
            }
        }       
        for (j = i - 1; j >= k; j--) { 
            a[j + 1] = a[j];
        }   
        a[k] = x; 
    }
    for (i = 0; i < n; i++) {
        printf("%4d", a[i]);
    }  
    putchar('\n');
    return 0;
}
